Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control Log json communications with vscode-client tooling #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

albfan
Copy link

@albfan albfan commented Apr 22, 2020

Allow to control wheter or not you want to see the json messages between client and server

NOTE: I set the client id as vala (vala.trace.server), but there're other settings using vls as id (vls.execPath).

fixes #6

@albfan
Copy link
Author

albfan commented Apr 22, 2020

There's a simplest version for the property editable on settings tab which is:

				"vala.trace.server": {
					"scope": "window",
					"type": "string",
					"enum": [
						"off",
						"messages",
						"verbose"
					],
					"default": "off",
					"description": "Traces the communication between VS Code and the language server."
				}

But I put the full featured one (which allows to decide on format (text or json) for output. Is a little worse because you have to edit directly on settings.json. I don't have a preference if this seems interesting

@Prince781
Copy link
Member

Good commit, but you should bump the version number up to 1.0.3 for this

@Prince781
Copy link
Member

I tried this out but it doesn't seem to affect anything. Could you explain how this feature is used and what should change in the output of the extension?

@albfan
Copy link
Author

albfan commented Apr 23, 2020

I think you need to remove installed plugin to see it work.

Will change the version in a while

To use you press Ctrl+, and change the setting for vala.trace.server.

So you can enable for a while, and disable in same session.

Attached screencast (NOTE: gitlab render webm by default)Uploading vls-json-log.zip…

This allows to remove G_MESSAGE_DEBUG or add a new true/false property trace.server.app or similar that adds the G_MESSAGE_DEBUG= so you can control if server logs its output or not, etc...

@Prince781
Copy link
Member

Prince781 commented Apr 23, 2020

@albfan There's no attachment. You can use something like https://streamable.com if you want to upload screencasts

}
},
transport: TransportKind.stdio
}
};

this.ls = new LanguageClient('Vala Language Server', serverOptions, clientOptions)
this.ls = new LanguageClient('vala', 'Vala Language Server', serverOptions, clientOptions)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're changing the prefix can you change vls.languageServerPath to vala.languageServerPath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to debug json communications
3 participants